
namespace OpenWeb.Dal.Models
{
    using System;
    using System.Collections.Generic;
  using System.ComponentModel.DataAnnotations;
  using System.ComponentModel.DataAnnotations.Schema;
    
    public partial class Address
    {
        public Address()
        {
            this.Contacts = new HashSet<Contact>();
        }

        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        #region Primitive Properties
        [Required]
        public virtual int ID
        {
          get;
          set;
        }
        [Required]
        public virtual int IDContacts
        {
          get;
          set;
        }
        [Required]
        [MaxLength(100)]
        public virtual string Adress
        {
          get;
          set;
        }
        [Required]
        [MaxLength(50)]
        public virtual string City
        {
          get;
          set;
        }
        [Required]
        [MaxLength(30)]
        public virtual string Location
        {
          get;
          set;
        }
        //[Required]
        [MaxLength(20)]
        public virtual string Region
        {
          get;
          set;
        }
        [Required]
        [MaxLength(20)]
        public virtual string State
        {
          get;
          set;
        }
        //[Required]
        public virtual Nullable<bool> IsDeleted
        {
          get;
          set;
        }

        #endregion
    
        public virtual ICollection<Contact> Contacts { get; set; }
    }
}
